<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: 'app',
  components: {},
  data() {
    return {}
  },
  created() {
    let style1 = JSON.parse(localStorage.getItem('style'))
    console.log(style1)
    if (localStorage.getItem('style')){
      this.$store.commit('buju/changestyle', style1)
    }
  },
  watch: {
    $route: {
      immediate: true, // 刷新页面就立即监听
      handler(val, oldval) {
        console.log(this.$route.path);
        if(this.$route.path=='/login'){
          document.title = '通用后台管理系统'
        }
     
        
      },
    },
  }
}
</script>

<style>
html,
body,
#app {
  width: 100%;
  height: 100%;
}
</style>
